home *** CD-ROM | disk | FTP | other *** search
/ Chaos CD Blue / Chaos_CD_Blue__[1999].iso / contrib / security / Cryptography_FAQ_(06_10_Public_Key_Cryptography) < prev    next >
Internet Message Format  |  1999-11-21  |  15KB

  1. Path: senator-bedfellow.mit.edu!faqserv
  2. From: crypt-comments@math.ncsu.edu
  3. Newsgroups: sci.crypt,talk.politics.crypto,sci.answers,news.answers,talk.answers
  4. Subject: Cryptography FAQ (06/10: Public Key Cryptography)
  5. Supersedes: <cryptography-faq/part06_939635163@rtfm.mit.edu>
  6. Followup-To: poster
  7. Date: 1 Nov 1999 11:28:42 GMT
  8. Organization: The Crypt Cabal
  9. Lines: 274
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 6 Dec 1999 11:27:53 GMT
  12. Message-ID: <cryptography-faq/part06_941455673@rtfm.mit.edu>
  13. References: <cryptography-faq/part01_941455673@rtfm.mit.edu>
  14. Reply-To: crypt-comments@math.ncsu.edu
  15. NNTP-Posting-Host: penguin-lust.mit.edu
  16. X-Last-Updated: 1994/07/05
  17. Originator: faqserv@penguin-lust.MIT.EDU
  18. Xref: senator-bedfellow.mit.edu sci.crypt:112660 talk.politics.crypto:38796 sci.answers:10787 news.answers:170059 talk.answers:4010
  19.  
  20. Archive-name: cryptography-faq/part06
  21. Last-modified: 94/06/07
  22.  
  23. This is the sixth of ten parts of the sci.crypt FAQ. The parts are
  24. mostly independent, but you should read the first part before the rest.
  25. We don't have the time to send out missing parts by mail, so don't ask.
  26. Notes such as ``[KAH67]'' refer to the reference list in the last part.
  27.  
  28. The sections of this FAQ are available via anonymous FTP to rtfm.mit.edu 
  29. as /pub/usenet/news.answers/cryptography-faq/part[xx]. The Cryptography 
  30. FAQ is posted to the newsgroups sci.crypt, talk.politics.crypto, 
  31. sci.answers, and news.answers every 21 days.
  32.  
  33.  
  34.  
  35. Contents:
  36.  
  37. 6.1. What is public-key cryptography?
  38. 6.2. How does public-key cryptography solve cryptography's Catch-22?
  39. 6.3. What is the role of the `trapdoor function' in public key schemes?
  40. 6.4. What is the role of the `session key' in public key schemes?
  41. 6.5. What's RSA?
  42. 6.6. Is RSA secure?
  43. 6.7. What's the difference between the RSA and Diffie-Hellman schemes?
  44. 6.8. What is `authentication' and the `key distribution problem'?
  45. 6.9. How fast can people factor numbers?
  46. 6.10. What about other public-key cryptosystems?
  47. 6.11. What is the `RSA Factoring Challenge?'
  48.  
  49.  
  50. 6.1. What is public-key cryptography?
  51.  
  52.   In a classic cryptosystem, we have encryption functions E_K and
  53.   decryption functions D_K such that D_K(E_K(P)) = P for any plaintext
  54.   P. In a public-key cryptosystem, E_K can be easily computed from some
  55.   ``public key'' X which in turn is computed from K. X is published, so
  56.   that anyone can encrypt messages. If decryption D_K cannot be easily 
  57.   computed from public key X without knowledge of private key K, but 
  58.   readily with knowledge of K, then only the person who generated K can 
  59.   decrypt messages. That's the essence of public-key cryptography, 
  60.   introduced by Diffie and Hellman in 1976. 
  61.   
  62.   This document describes only the rudiments of public key cryptography.
  63.   There is an extensive literature on security models for public-key 
  64.   cryptography, applications of public-key cryptography, other 
  65.   applications of the mathematical technology behind public-key 
  66.   cryptography, and so on; consult the references at the end for more 
  67.   refined and thorough presentations.
  68.  
  69. 6.2. How does public-key cryptography solve cryptography's Catch-22?
  70.  
  71.   In a classic cryptosystem, if you want your friends to be able to
  72.   send secret messages to you, you have to make sure nobody other than
  73.   them sees the key K. In a public-key cryptosystem, you just publish 
  74.   X, and you don't have to worry about spies. Hence public key 
  75.   cryptography `solves' one of the most vexing problems of all prior 
  76.   cryptography: the necessity of establishing a secure channel for the 
  77.   exchange of the key. To establish a secure channel one uses 
  78.   cryptography, but private key cryptography requires a secure channel! 
  79.   In resolving the dilemma, public key cryptography has been considered 
  80.   by many to be a `revolutionary technology,' representing a 
  81.   breakthrough that makes routine communication encryption practical 
  82.   and potentially ubiquitous.
  83.  
  84. 6.3. What is the role of the `trapdoor function' in public key schemes?
  85.   
  86.   Intrinsic to public key cryptography is a `trapdoor function' D_K 
  87.   with the properties that computation in one direction (encryption, 
  88.   E_K) is easy and in the other is virtually impossible (attack,
  89.   determining P from encryption E_K(P) and public key X). Furthermore, 
  90.   it has the special property that the reversal of the computation 
  91.   (decryption, D_K) is again tractable if the private key K is known.
  92.  
  93. 6.4. What is the role of the `session key' in public key schemes?
  94.  
  95.   In virtually all public key systems, the encryption and decryption 
  96.   times are very lengthy compared to other block-oriented 
  97.   algorithms such as DES for equivalent data sizes. Therefore in most
  98.   implementations of public-key systems, a temporary, random `session 
  99.   key' of much smaller length than the message is generated for each 
  100.   message and alone encrypted by the public key algorithm. The message 
  101.   is actually encrypted using a faster private key algorithm with the 
  102.   session key. At the receiver side, the session key is decrypted using 
  103.   the public-key algorithms and the recovered `plaintext' key is used 
  104.   to decrypt the message.
  105.   
  106.   The session key approach blurs the distinction between `keys' and 
  107.   `messages' -- in the scheme, the message includes the key, and the 
  108.   key itself is treated as an encryptable `message'. Under this 
  109.   dual-encryption approach, the overall cryptographic strength is 
  110.   related to the security of either the public- and private-key 
  111.   algorithms.
  112.  
  113. 6.5. What's RSA?
  114.  
  115.   RSA is a public-key cryptosystem defined by Rivest, Shamir, and
  116.   Adleman. Here's a small example. See also [FTPDQ].
  117.  
  118.   Plaintexts are positive integers up to 2^{512}. Keys are quadruples
  119.   (p,q,e,d), with p a 256-bit prime number, q a 258-bit prime number,
  120.   and d and e large numbers with (de - 1) divisible by (p-1)(q-1). We
  121.   define E_K(P) = P^e mod pq, D_K(C) = C^d mod pq. All quantities are
  122.   readily computed from classic and modern number theoretic algorithms 
  123.   (Euclid's algorithm for computing the greatest common divisor yields
  124.   an algorithm for the former, and historically newly explored
  125.   computational approaches to finding large `probable' primes, such as 
  126.   the Fermat test, provide the latter.)
  127.  
  128.   Now E_K is easily computed from the pair (pq,e)---but, as far as
  129.   anyone knows, there is no easy way to compute D_K from the pair
  130.   (pq,e). So whoever generates K can publish (pq,e). Anyone can send a
  131.   secret message to him; he is the only one who can read the messages.
  132.  
  133. 6.6. Is RSA secure?
  134.  
  135.   Nobody knows. An obvious attack on RSA is to factor pq into p and q.
  136.   See below for comments on how fast state-of-the-art factorization
  137.   algorithms run. Unfortunately nobody has the slightest idea how to
  138.   prove that factorization---or any realistic problem at all, for that
  139.   matter---is inherently slow. It is easy to formalize what we mean by
  140.   ``RSA is/isn't strong''; but, as Hendrik W. Lenstra, Jr., says,
  141.   ``Exact definitions appear to be necessary only when one wishes to
  142.   prove that algorithms with certain properties do _not_ exist, and
  143.   theoretical computer science is notoriously lacking in such negative
  144.   results.''
  145.  
  146.   Note that there may even be a `shortcut' to breaking RSA other than
  147.   factoring. It is obviously sufficient but so far not provably 
  148.   necessary. That is, the security of the system depends on two 
  149.   critical assumptions: (1) factoring is required to break the system,
  150.   and (2) factoring is `inherently computationally intractable',
  151.   or, alternatively, `factoring is hard' and `any approach that can 
  152.   be used to break the system is at least as hard as factoring'.
  153.  
  154.   Historically even professional cryptographers have made mistakes
  155.   in estimating and depending on the intractability of various 
  156.   computational problems for secure cryptographic properties. For 
  157.   example, a system called a `Knapsack cipher' was in vogue in the
  158.   literature for years until it was demonstrated that the instances
  159.   typically generated could be efficiently broken, and the whole
  160.   area of research fell out of favor.
  161.  
  162. 6.7. What's the difference between the RSA and Diffie-Hellman schemes?
  163.  
  164.   Diffie and Hellman proposed a system that requires the dynamic 
  165.   exchange of keys for every sender-receiver pair (and in practice, 
  166.   usually every communications session, hence the term `session key').  
  167.   This two-way key negotiation is useful in further complicating 
  168.   attacks, but requires additional communications overhead. The RSA 
  169.   system reduces communications overhead with the ability to have 
  170.   static, unchanging keys for each receiver that are `advertised' by 
  171.   a formal `trusted authority' (the hierarchical model) or distributed 
  172.   in an informal `web of trust'.
  173.  
  174. 6.8. What is `authentication' and the `key-exchange problem'?
  175.  
  176.   The ``key exchange problem'' involves (1) ensuring that keys are
  177.   exchanged so that the sender and receiver can perform encryption and
  178.   decryption, and (2) doing so in such a way that ensures an
  179.   eavesdropper or outside party cannot break the code. `Authentication'
  180.   adds the requirement that (3) there is some assurance to the receiver
  181.   that a message was encrypted by `a given entity' and not `someone 
  182.   else'.
  183.  
  184.   The simplest but least available method to ensure all constraints 
  185.   above are satisfied (successful key exchange and valid authentication)
  186.   is employed by private key cryptography: exchanging the key secretly.
  187.   Note that under this scheme, the problem of authentication is 
  188.   implicitly resolved. The assumption under the scheme is that only the
  189.   sender will have the key capable of encrypting sensible messages
  190.   delivered to the receiver. 
  191.  
  192.   While public-key cryptographic methods solve a critical aspect of the 
  193.   `key-exchange problem', specifically their resistance to analysis
  194.   even with the presence a passive eavesdropper during exchange of keys, 
  195.   they do not solve all problems associated with key exchange. In
  196.   particular, since the keys are considered `public knowledge,'
  197.   (particularly with RSA) some other mechanism must be
  198.   developed to testify to authenticity, because possession of keys 
  199.   alone (sufficient to encrypt intelligible messages) is no evidence
  200.   of a particular unique identity of the sender.
  201.  
  202.   One solution is to develop a key distribution mechanism that assures
  203.   that listed keys are actually those of the given entities, sometimes
  204.   called a `trusted authority'. The authority typically does not actually
  205.   generate keys, but does ensure via some mechanism that the lists of 
  206.   keys and associated identities kept and advertised for reference
  207.   by senders and receivers are `correct'. Another method relies on users
  208.   to distribute and track each other's keys and trust in an informal,
  209.   distributed fashion. This has been popularized as a viable alternative
  210.   by the PGP software which calls the model the `web of trust'.
  211.  
  212.   Under RSA, if a person wishes to send evidence of their identity in
  213.   addition to an encrypted message, they simply encrypt some information
  214.   with their private key called the `signature', additionally included in
  215.   the message sent under the public-key encryption to the receiver. 
  216.   The receiver can use the RSA algorithm `in reverse' to verify that the
  217.   information decrypts sensibly, such that only the given entity could
  218.   have encrypted the plaintext by use of the secret key. Typically the
  219.   encrypted `signature' is a `message digest' that comprises a unique
  220.   mathematical `summary' of the secret message (if the signature were
  221.   static across multiple messages, once known previous receivers could 
  222.   use it falsely). In this way, theoretically only the sender of the
  223.   message could generate their valid signature for that message, thereby
  224.   authenticating it for the receiver. `Digital signatures' have many 
  225.   other design properties as described in Section 7.
  226.  
  227.  
  228. 6.9. How fast can people factor numbers?
  229.  
  230.   It depends on the size of the numbers, and their form. Numbers
  231.   in special forms, such as a^n - b for `small' b, are more readily
  232.   factored through specialized techniques and not necessarily related
  233.   to the difficulty of factoring in general. Hence a specific factoring 
  234.   `breakthrough' for a special number form may have no practical value 
  235.   or relevance to particular instances (and those generated for use
  236.   in cryptographic systems are specifically `filtered' to resist such
  237.   approaches.) The most important observation about factoring is that
  238.   all known algorithms require an exponential amount of time in the
  239.   _size_ of the number (measured in bits, log2(n) where `n' is the 
  240.   number). Cryptgraphic algorithms built on the difficulty of factoring
  241.   generally depend on this exponential-time property. (The distinction
  242.   of `exponential' vs. `polynomial time' algorithms, or NP vs. P, is a 
  243.   major area of active computational research, with insights very 
  244.   closely intertwined with cryptographic security.)
  245.   
  246.   In October 1992 Arjen Lenstra and Dan Bernstein factored 2^523 - 1 
  247.   into primes, using about three weeks of MasPar time. (The MasPar is 
  248.   a 16384-processor SIMD machine; each processor can add about 200000 
  249.   integers per second.) The algorithm there is called the ``number field 
  250.   sieve''; it is quite a bit faster for special numbers like 2^523 - 1 
  251.   than for general numbers n, but it takes time only 
  252.   exp(O(log^{1/3} n log^{2/3} log n)) in any case.
  253.  
  254.   An older and more popular method for smaller numbers is the ``multiple
  255.   polynomial quadratic sieve'', which takes time exp(O(log^{1/2} n
  256.   log^{1/2} log n))---faster than the number field sieve for small n,
  257.   but slower for large n. The breakeven point is somewhere between 100
  258.   and 150 digits, depending on the implementations.
  259.  
  260.   Factorization is a fast-moving field---the state of the art just a few
  261.   years ago was nowhere near as good as it is now. If no new methods are
  262.   developed, then 2048-bit RSA keys will always be safe from
  263.   factorization, but one can't predict the future. (Before the number
  264.   field sieve was found, many people conjectured that the quadratic
  265.   sieve was asymptotically as fast as any factoring method could be.)
  266.  
  267. 6.10. What about other public-key cryptosystems?
  268.  
  269.   We've talked about RSA because it's well known and easy to describe.
  270.   But there are lots of other public-key systems around, many of which
  271.   are faster than RSA or depend on problems more widely believed to be
  272.   difficult. This has been just a brief introduction; if you really want
  273.   to learn about the many facets of public-key cryptography, consult the
  274.   books and journal articles listed in part 10.
  275.  
  276. 6.11. What is the ``RSA Factoring Challenge''?
  277.  
  278.   [Note: The e-mail addresses below have been reported as invalid.]
  279.   In ~1992 the RSA Data Securities Inc., owner and licensor of multiple
  280.   patents on the RSA hardware and public key cryptographic techniques in
  281.   general, and maker of various software encryption packages and 
  282.   libraries, announced on sci.math and elsewhere the creation of an 
  283.   ongoing Factoring Challenge contest to gauge the state of the art in
  284.   factoring technology. Every month a series of numbers are posted and
  285.   monetary awards are given to the first respondent to break them into
  286.   factors. Very significant hardware resources are required to succeed 
  287.   by beating other participants. Information can be obtained via 
  288.   automated reply from
  289.  
  290.     challenge-rsa-honor-roll@rsa.com
  291.     challenge-partition-honor-roll@rsa.com
  292.  
  293.